﻿using MiniFox.Components;
using Wechat.Corp.Auth.Models;

namespace Wechat.Corp.Auth.Services
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(WechatAgentAuthService))]
    public interface IWechatAgentAuthService : IWechatAgentService
    {
        /// <summary>
        /// 
        /// </summary>
        Uri OpenAuthUri { get; }
        /// <summary>
        /// 
        /// </summary>
        Uri QrAuthUri { get; }
        /// <summary>
        /// 
        /// </summary>
        Uri SessionUri { get; }
        /// <summary>
        /// 
        /// </summary>
        Uri UserInfoUri { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="redirectUri"></param>
        /// <param name="state"></param>
        /// <param name="authMode"></param>
        /// <returns></returns>
        string CreateRedirectUri(string redirectUri, string state, AuthMode authMode);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="authCode"></param>
        /// <returns></returns>
        Task<SessionResponse> GetSessionAsync(string authCode);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="authCode"></param>
        /// <returns></returns>
        Task<UserInfoResponse> GetUserInfoAsync(string authCode);
    }
}
